package com.dl.redis.util;

/**
 * @author DL
 * @create 2023-09-13 14:32
 */
public class LockContext {

    private static final ThreadLocal<String> LOCK_UUID = ThreadLocal.withInitial(() -> "");

    public static void setLockUuid(String uuid) {
        LOCK_UUID.set(uuid);
    }

    public static String getLockUuid() {
        return LOCK_UUID.get();
    }

    public static void clearLockUuid() {
        LOCK_UUID.remove();
    }
}
